From: Andrew Garrett Date: Thu, 24 Apr 2008 06:56:34 +0000 (+0000) Subject: Split off getAllGroups(), to facilitate subclassing for weird circumstances (like... X-Git-Tag: 1.31.0-rc.0~48109 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=8bdfe47406c7ae679b1387aa53583847802198c0;p=lhc%2Fweb%2Fwiklou.git Split off getAllGroups(), to facilitate subclassing for weird circumstances (like, for example, writing a global version of it to go with CentralAuth) --- diff --git a/includes/SpecialUserrights.php b/includes/SpecialUserrights.php index 303f6bd4f8..a1b9b41cdd 100644 --- a/includes/SpecialUserrights.php +++ b/includes/SpecialUserrights.php @@ -290,7 +290,7 @@ class UserrightsPage extends SpecialPage { global $wgOut, $wgScript; $wgOut->addHTML( Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) . - Xml::hidden( 'title', 'Special:Userrights' ) . + Xml::hidden( 'title', $this->getTitle() ) . Xml::openElement( 'fieldset' ) . Xml::element( 'legend', array(), wfMsg( 'userrights-lookup-user' ) ) . Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, $this->mTarget ) . ' ' . @@ -388,6 +388,14 @@ class UserrightsPage extends SpecialPage { $cache[$group] = User::makeGroupLinkHtml( $group, User::getGroupName( $group ) ); return $cache[$group]; } + + /** + * Returns an array of all groups that may be edited + * @return array Array of groups that may be edited. + */ + private function getAllGroups() { + return User::getAllGroups(); + } /** * Adds the element */ private function groupCheckboxes( $usergroups ) { - $allgroups = User::getAllGroups(); + $allgroups = self::getAllGroups(); $ret = ''; $column = 1;